#ifndef __MOUSE_H
#define __MOUSE_H

#define MOUSE_RTS_DELAY       200

#define MOUSE_PORT       PORTD
#define MOUSE_PIN        PIND
#define MOUSE_DDR        DDRD
#define MOUSE_0_DATA_PIN      (1 << PD6)
#define MOUSE_1_DATA_PIN      (1 << PD7)
#define MOUSE_0_CLOCK_PIN     (1 << PD2)
#define MOUSE_1_CLOCK_PIN     (1 << PD3)

#define MOUSE_DATA_INFO_GOT_DATA  		0b00010000
#define MOUSE_DATA_INFO_MODE_SEND  		0b00100000
#define MOUSE_DATA_INFO_IS_TRANSMITING  0b01000000
#define MOUSE_DATA_INFO_START_BIT_DONE  0b10000000

#define Y_SIGN_BIT 0b00100000
#define X_SIGN_BIT 0b00010000


struct mouseDataFrame {
	uint8_t data;
	uint8_t frameNumber;
	uint8_t bitsCounter;
	uint8_t info;
	uint8_t packets[3];
};

inline void initMouses();
uint8_t getMouse0Data(uint8_t data[]);
uint8_t getMouse1Data(uint8_t data[]);

#endif
